package com.sansui.admin.core.model;

import java.io.Serializable;

import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import com.sansui.admin.core.groups.RoleAdd;
import com.sansui.admin.core.groups.RoleUpdate;

import lombok.Data;


@Data
@Table(name="system_role")
public class Role  implements Serializable{
    /**
	 * 
	 */
	private static final long serialVersionUID = 3582588209589180635L;
	@NotNull(groups = { RoleUpdate.class }, message = "id不能为空")  
	private String id;
	@NotNull(groups = { RoleUpdate.class,RoleAdd.class }, message = "name不能为空")  
    private String name;

	
    public Role(String id, String name) {
		super();
		this.id = id;
		this.name = name;
	}
    
	public Role(){
		 
	}
}